# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-amazon-soho
pkgdesc="Amazon Kindle Fire HD (3rd Generation)"
pkgver=2
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="postmarketos-base linux-amazon-soho mkbootimg"
makedepends="devicepkg-dev"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
source="
	deviceinfo
	initfs-hook.sh
	amazon-omap-boot-hack.sh
	modules-load.conf
"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
	install -Dm755 "$srcdir/amazon-omap-boot-hack.sh" "$pkgdir/usr/share/mkinitfs/amazon-omap-boot-hack.sh"
}

nonfree_firmware() {
	pkgdesc="Wifi firmware"
	depends="firmware-amazon-soho"
	mkdir "$subpkgdir"
}

sha512sums="
81b7b05d57d9c85bc3ad84fb398916c8d9cfc2d67b04ac7d47d244038b621b1a8dfccedb50c359b9bb5359fc2171a3f75fd0be609ca8c8b1250ee1859aaee29d  deviceinfo
1aca985770246b9ca140996a498815b5c9ca3458a6cb84db85825344f01deda8b1de7c88e2e0c610df636ad2179faac7fd90d9992add51186a6449f2d43a3f71  initfs-hook.sh
b031a2bd8e0e206196df9bfa5299c7172ce5d185c77a148422269e2c8a556769b5f6e29dcfe3f4e50968f8a860a8f927a6fcab2021d48e8912c3d5e76b50d61b  amazon-omap-boot-hack.sh
61e8becbf6fa7c1c6c42e481083f5981ae7af33a48cbc53e817d8ac2c6a8e4f67a54b32ae3b8f5f25f7b412165a849dc93a629110dc47b0d16927bf2a12eb7e1  modules-load.conf
"
